<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<jsp:include page="../pageheader.jsp"/>

<div class="container">  
    <div class="jumbotron">
        <form class="form-horizontal">
            <div class="form-group">
                <label for="departueDateField" class="col-xs-12 col-sm-3">Estimated departue date</label>
                <div class="col-xs-12 col-sm-7">
                    <input id="departueDateField" class="form-control" type="text" placeholder="Departue date" >
                </div>
            </div>
            <div class="form-group">
                <label for="arrivalDateField" class="col-xs-12 col-sm-3">Estimated arrival date</label>
                <div class="col-xs-12 col-sm-7">
                    <input id="arrivalDateField" class="form-control" type="text" placeholder="Arrival date" >
                </div>
            </div>
            <div class="form-group">
                <label for="descriptionField" class="col-xs-12 col-sm-3">Description</label>
                <div class="col-xs-12 col-sm-7">
                    <textarea class="form-control input-sm" id="descriptionField" placeholder="Insert a small description for the trip"></textarea>
                </div>
            </div>
            <div class="form-group">
                <label for="carDropDown" class="col-xs-12 col-sm-3">Car</label>
                <div class="col-xs-12 col-sm-7">
                    <select class="form-control" id="carDropDown">
                        <option value="-1">Select a car</option>
                        <c:if test="${cars != null}">
                            <c:forEach items="${cars}" var="car">
                                <option value="${car.getId()}">${car.getBrand()}</option>
                            </c:forEach>
                        </c:if>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label for="startingCountryDropDown" class="col-xs-12 col-sm-3">Starting country</label>
                <div class="col-xs-12 col-sm-7">
                    <select class="form-control" id="startingCountryDropDown">
                        <option value="-1">Select the starting country</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label for="startingAddressDropDown" class="col-xs-12 col-sm-3">Starting address</label>
                <div class="col-xs-12 col-sm-7">
                    <select class="form-control" id="startingAddressDropDown">
                        <option value="-1">Select the starting address</option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label for="destinyCountryDropDown" class="col-xs-12 col-sm-3">Destiny country</label>
                <div class="col-xs-12 col-sm-7">
                    <select class="form-control" id="destinyCountryDropDown">
                        <option value="-1">Select destiny country</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label for="destinyAddressDropDown" class="col-xs-12 col-sm-3">Destiny address</label>
                <div class="col-xs-12 col-sm-7">
                    <select class="form-control" id="destinyAddressDropDown">
                        <option value="-1">Select destiny address</option>
                    </select>
                </div>
            </div>

            <div id="createTripButtonArea" class="form-group">
                <button type="button" onclick="deepClean()" class="btn btn-default">Reset</button>
                <button type="button" onclick="sendNewTrip()" class="btn btn-primary">Submit</button>
            </div>
        </form>
    </div>
</div>

<jsp:include page="../pagefooter.jsp"/>

